/**
 * The Dao entry function
 */
import db from './db';
 
export default class BaseDao extends db{

	init() {
		
	}
	/**
	 * [Add description]
	 */
	Add(params) {

		return this.BaseDao.Add(params);
	}

	UpdateById(params) {
		return this.BaseDao.UpdateById(params);
	}

	DeleteById(id) {
		return this.BaseDao.DeleteById(id)
	}

	SelectById(id) {
		return this.BaseDao.selectById(id)
	}

	Search(params) {
		return this.BaseDao.Search(params)
	}

	async Count(params) {
		return await this.db.fields([{count:'*'}]).where(params).execute();
	}

	SelectPage(params, page, size) {
		return this.BaseDao.selectPage(params, page, size)
	}
}